1. Field of the Invention
The present invention relates to a face image processing apparatus for an eyewink detection, including extracting naris areas, which is relatively easy to be extracted, through image processing, then estimating the position of eyes based on the position of nares to extract eye areas, and detecting opening/closing states of the eyes from shape features of the eye areas.
2. Description of the Related Art
Conventional face image processing apparatuses include a face image processing apparatus described in Japanese Patent Application Laid-Open No. Hei 8-300978, as an example. This face image processing apparatus is characterized by a binary image on which eye and naris areas are extracted and the opening and closing of the eyes are detected.
FIG. 9 is a schematic structural view showing the face image processing apparatus described in Japanese Patent Application Laid-Open No. Hei 8-300978.
In this figure, a multi-valued image captured by a camera 2 serving as image input means for photographing the person to be detected 1 is temporarily stored in a multi-valued image memory 3 serving as multi-valued image storage means. The stored image is then converted into a binary image by binarization means 4, which is then temporarily stored in a binary image memory 5 serving as binary image storage means. Feature extraction means 6 extracts binary areas of the eyes and nares, and open/close detection means 7 detects opening/closing states of the eyes based on the shape feature of the eyes.
The operation will now be described with reference to FIGS. 10 to 12.
FIG. 10 is a flow chart showing an eye tracing algorithm in the face image processing apparatus shown in FIG. 9.
Referring to FIG. 10, a multi-valued image of the person to be detected 1 is obtained by the camera 2 photographing a face image (Step S1). A process of camera control is also involved herein. The multi-valued image obtained at Step S1 is temporarily stored frame by frame in the multi-valued image memory 3 at Step S2. The multi-valued image obtained at Step S2 is converted into a binary image by the binarization means 4 (Step S3), and is then temporarily stored frame by frame in the binary image memory 5 (Step S4).
Then, the feature extraction means 6 extracts nares out of the binary image outputted from the binary image memory 5 (Step S5), and both eye areas are estimated from configuration conditions of the face based on the position of nares, to set eye candidate areas (Step S6). Subsequently, at Step S7, eye areas are selected from the eye candidate areas; provided, however, that the shape feature or the deviation in the position on the previous screen is used to select the eye candidate areas. Subsequent to the initial extraction, positional estimations for both the eyes and the nares are carried out using the position on the previous screen as reference. Typically, the position of eyes is extracted using the position of nares as reference, but the case where nares have not been extracted will permit a complement with the position of eyes. If the eye binary area is selected at Step S7, the open/close detection means 7 detects open/close (Step S8), back to Step S1.
FIG. 11 is an example of error extraction of eyebrows when the eye binary area is selected at Step S7 as described above. Some of the eye binary area may often be lost in this way due to the illumination condition for the person to be detected or when a binarization threshold is much larger than the proper value. If eyes and eyebrows are involved in the eye candidate binary areas 16, an eyebrow similar in shape may be erroneously extracted. In addition, once an eyebrow is erroneously extracted, an inaccurate trace occurs because the relative position of the eye binary area to the naris binary area 12 is similar to the relative position of the eyebrow to the eye. This results in a difficult return to an accurate eye trace.
As opposed to FIG. 11, if the binarization threshold is lower than the proper value, the shaded outer canthus of the left eye may be involved in the eye binary area (see, FIG. 7(b)). The open/close detection means 7 provides an open/close detecting eye cut area 15 which is set using an eye centroid 11 as reference. Therefore, if there is any undesired binary area involved, the eye cut area will be set deviating from the actual eye area, and no correct open/close detection can be carried out.
FIG. 12 is a flow chart showing a specific operation for the open/close detection at Step S8 in FIG. 10.
A centroid position is set at Step S10 in the eye binary area selected at Step S7. At Step S11, an eye area is cut for the open/close detection so that the right-hand and left-hand portions in the horizontal direction of the face may be balanced using the eye centroid as reference. At Step S12, the shape feature of the outer canthus is extracted on the eye binary area within the open/close detecting eye cut area, regarded as an eye evaluation functional value. At Step S13, the eye evaluation functional value is compared to an open/close threshold, leading to an eye opening detection at Step S14 or an eye closure detection at Step S15 in accordance with the result. When the eye closure detection is resulted, the time period of closing the eye is counted at Step S16.
Alternatively, conventional face image processing apparatuses using a template include a face image processing apparatus described in Japanese Patent Application Laid-Open No. Hei 8-175218, for instance. This face image processing apparatus is characterized by including template production means for producing an objective template for the person to be detected, in which a preset standard face template is successively vertically and horizontally moved across a picked-up image to perform a correlative operation, and eye area detection means for detecting an eye area of the person to be detected using such an objective template.
FIG. 13 is a schematic structural view showing the face image processing apparatus described in Japanese Patent Application Laid-Open No. Hei 8-175218.
Referring to FIG. 13, an image processor 31 is connected to a camera 2 for photographing the person to be detected 1, and a face image of the person to be detected 1 is then delivered to the image processor 31. The image processor 31 incorporates an A/D converter, a normalization circuit, and a correlative operation circuit, in which an input image signal is converted into a digital signal to be then normalized for a light and shade image. A memory 32 is also connected to the image processor 31. A standard template and configuration data of the face elements such as eyes and eyebrows are in advance stored in the memory 32. The image processor 31 is further connected to an ECU (Electronic Control Unit) 33 and delivers the processing results to the ECU 33. The ECU 33 is so arranged as to determine the operation state of the person to be detected 1 from the processing results and to output a control signal to an alarm 34 to thereby issue an alarm.
However, there were problems as below with the conventional face image processing apparatus previously described in Japanese Patent Application Laid-Open No. Hei 8-300978.
Namely, binarization means converts a multi-valued image into a binary image for the image processing. In this case, gray information in the multi-valued image is eliminated. For this reason, the binarization threshold must be controlled every screen in accordance with the brightness of the face image of the person to be detected who was photographed, in order to correctly recognize the shape feature of the eyes/nares. The extraction results of the feature is greatly varied depend upon this binarization threshold.
Further, the binary shape feature unstably varies due to influence of the binarization threshold. For example, the entire portion of the face may vary in brightness or the face orientation may be changed during the transition from the naris extraction to the eye extraction. Further, the binarization threshold may be suitable for the naris extraction while the binarization threshold may not be suitable for the eye extraction because different brightness is given to some parts of the face. In the foregoing cases, the shape of eyes and nares cannot be correctly extracted for the binary area at the same time, from the binary image generated with a unique binarization threshold for every screen. In particular, if the eye binary area is broken in shape, the eyebrow might be erroneously extracted, or the open/close detection might not be correctly carried out even with a correct eye extraction.
In other words, some of the eye binary area may often be lost in this way due to the illumination condition for the person to be detected or when a binarization threshold is much larger than the proper value. If eyes and eyebrows are involved in the eye candidate binary areas, an eyebrow similar in shape may be erroneously extracted. In addition, once an eyebrow is erroneously extracted, an inaccurate trace occurs because the relative position of the eye binary area to the naris binary area is similar to the relative position of the eyebrow to the eye. This results in a difficult return to an accurate eye trace, and such a problem may occur.
In addition, open/close detection means provides an open/close detecting eye cut area which is set using an eye centroid as reference. Therefore, if there is any undesired binary area involved, the area will be set deviating from the actual eye area, and no correct open/close detection can be carried out. Such a problem may also occur.
On the other hand, in the conventional face image processing apparatus described in Japanese Patent Application Laid-Open No. Hei 8-175218, a positional relation in the vertical direction between eyes and eyebrows is invariable even with the vertical movement of the face. Therefore, the eye area can ensure to be specified such that an objective eye vicinity area is used to detect an eye vicinity area, where the upper black portion is an eyebrow and the lower black portion is an eye. However, difficulty arises in that, taking the movement of the face into consideration, the image must be scanned to a broad extent for a template matching, resulting in increasing the time period of processing the correlative operation.
The present invention has been therefore made to overcome the foregoing problems, and therefore has an object of the present invention is to provide a face image processing apparatus capable of preventing the error extraction of the eye when extracted, improving reliability of the open/close detection through a two-dimensional feature of the eye area, and also quickly performing the open/close detection.
According to a first aspect of the present invention, there is provided a face image processing apparatus comprising: image input means for inputting a face image of a person to be detected; multi-valued image storage means for temporarily storing the light and shade image obtained by said image input means; binarization means for binarizing the light and shade image outputted from said multi-valued image storage means; binary image storage means for temporarily storing the binary image obtained by said binarization means; feature extraction means for extracting a naris area from said binary image outputted from said binary image storage means, and for extracting an eye area based on the naris area; and open/close detection means for detecting the opening/closing states of the eye based on the shape feature of the eye area obtained by said feature extraction means.
According to this arrangement, such an effect may be obtained that the opening/closing states of the eyes can be correctly detected, resulting in improving reliability in the open/close detection, and the open/close detection can be performed in a short processing time since a template matching is not required as opposed to the conventional one.
According to a second aspect of the present invention, in a face image processing apparatus of the first aspect of the present invention, said feature extraction means comprises: naris area extraction means for extracting a naris binary area from the binary image outputted from said binary image storage means; and eye area extraction means for extracting an eye binary area using as reference the naris binary area extracted by said naris area extraction means from the binary image outputted from said binary image storage means.
According to this arrangement, there can be obtained an effect that the opening/closing states of the eye can be more correctly detected.
According to a third aspect of the present invention, in a face image processing apparatus of the second aspect of the present invention, said eye area extraction means uses as a weight of eye candidate pixels at the eye extraction a deviation in distance between the naris binary area extracted by said naris area extraction means and the eye binary area at the previous extraction of the eye.
According to this arrangement, the effect thereof is such that the eye area can be correctly extracted with substantially an increased credibility of the eye candidate pixels, inhibiting the error extraction.
According to a fourth aspect of the present invention, in a face image processing apparatus of any one of the first to third aspects of the present invention, said open/close detection means uses eye area pixels weighted through the deviation of the naris when the centroid position of the eye is set as reference of cutting the eye area for the open/close detection.
According to this arrangement, such an effect can be obtained that the opening/closing states of the eye can be more correctly detected.